import {
	service
} from '@/service/service.js'

const state = {
	// 是否签到
	isSign: false,
	// 用户信息
	userInfo: {},
	// 地址列表
	address: {},
}

const getters = {
	userInfo(state) {
		return state.userInfo
	},
	address(state) {
		return state.address
	}
}

const actions = {
	
}

const mutations = {
	/**
	 * @desc 存储用户信息
	 * @param {*} state 
	 * @param {*} payload 
	 */
	setUserInfo(state, payload) {
		console.log('store modules user mutations setUserInfo', payload);
		state.userInfo = payload
	},

	/**
	 * @desc 存储用户地址列表
	 * @param {*} state 
	 * @param {*} payload 
	 */
	setAddress(state, payload) {
		state.address = payload
	}
}

export default {
	namespaced: true,
	state,
	getters,
	actions,
	mutations
}
